const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const TerserWebpackPlugin = require('terser-webpack-plugin')
module.exports = {
  mode: 'production',
  optimization: {
    usedExports: true, // tree-shaking默认为true
    minimizer: [
      new CssMinimizerPlugin(),
      new TerserWebpackPlugin(
        {
          exclude: /FocusEngine.min.js|config.js/,
          parallel:true //开启多进程打包
        }
      )
    ],
    splitChunks: {
      chunks: 'all'
    }
  },   
  performance: {
    hints: false
  }   
}